<ion-view view-title="商品添加" id="goods-add" hide-nav-bar="true">
  <ion-header-bar align-title="center" class="bar-calm">
    <div class="buttons">
      <button class="button head-button button-clear center-btn" ng-click="goBack()">
        <img src="img/order-commit/backIcon.png">
      </button>
    </div>
    <h1 class="title">添加商品</h1>
    <div class="buttons">
      <button class="button head-button button-clear center-btn" ng-click="goSave()">
        保存
      </button>
    </div>
  </ion-header-bar>
  <ion-content>
    <img-picker items="goods.mainimg" isupk="goods"></img-picker>

      <div class="list">
          <label class="item item-input">
              <span class="label">商品标题</span>
              <input type="text"
                     ng-model="goods.title"
                     ng-required="true"
                     placeholder="  商品标题"
                     style="margin-left:15px">
          </label>
          <label class="item item-input" >
              <span class="label">商品编号</span>
              <input type="text"
                     ng-model="goods.productno"
                     ng-required="true"
                     placeholder="  商品编号"
                     style="margin-left:15px">
          </label>
          <label class="item item-input" >
              <span class="label">商品库存</span>
              <input type="text"
                     ng-model="goods.productsku"
                     ng-required="true"
                     placeholder="  商品库存"
                     style="margin-left:15px">
          </label>
          <label class="item item-input" >
              <span class="label">销售价</span>
              <input type="text"
                     ng-model="goods.saleprice"
                     ng-required="true"
                     placeholder="  销售价"
                     style="margin-left:31px">
          </label>
          <label class="item item-input">
              <span class="label">计量单位</span>
              <input type="text"
                     ng-model="goods.unitage"
                     ng-required="true"
                     placeholder="  计量单位"
                     style="margin-left:15px">
          </label>
          <label class="item item-input">
              <span class="label">品牌</span>
              <input type="text"
                     ng-model="goods.brand"
                     ng-required="true"
                     placeholder="  商品品牌"
                     style="margin-left:15px">
          </label>
          <label class="item item-input">
              <span class="label">原产国</span>
              <input type="text"
                     ng-model="goods.countries"
                     ng-required="true"
                     placeholder="  原产国"
                     style="margin-left:15px">
          </label>
          <label class="item item-input">
              <span class="label">规格型号</span>
              <input type="text"
                     ng-model="goods.model"
                     ng-required="true"
                     placeholder="  规格型号"
                     style="margin-left:15px">
          </label>
          <label class="item item-input">
              <span class="label">规格参数</span>
              <input type="text"
                     ng-model="goods.conditions"
                     ng-required="true"
                     placeholder="  规格参数"
                     style="margin-left:15px">
          </label>
          <label class="item item-input">
              <span class="label">售后服务</span>
              <input type="text"
                     ng-model="goods.service"
                     ng-required="true"
                     placeholder="  售后服务"
                     style="margin-left:15px">
          </label>
          <label class="item item-input">
              <span class="label">运费</span>
              <input type="text"
                     ng-model="goods.sendmoney"
                     ng-required="true"
                     placeholder="  运费"
                     style="margin-left:15px">
          </label>
          <label class="item item-input">
              <span class="label">最新上架</span>
              <div class="divIs" on-tap="changeNewOn()">
                  <i ng-if="goods.isnew != 1" class="ion-ios-circle-outline"></i>
                  <i ng-if="goods.isnew == 1" class="ion-ios-checkmark-outline checked"></i>
                  <span>是</span>
              </div>
              <div class="divNo" on-tap="changeNewOff()">
                  <i ng-if="goods.isnew == 1" class="ion-ios-circle-outline"></i>
                  <i ng-if="goods.isnew != 1" class="ion-ios-checkmark-outline checked"></i>
                  <span>否</span>
              </div>
          </label>
          <label class="item item-input">
              <span class="label">热门促销</span>
              <div class="divIs" on-tap="changeHotOn()">
                  <i ng-if="goods.ishot != 1" class="ion-ios-circle-outline"></i>
                  <i ng-if="goods.ishot == 1" class="ion-ios-checkmark-outline checked"></i>
                  <span>是</span>
              </div>
              <div class="divNo" on-tap="changeHotOff()">
                  <i ng-if="goods.ishot == 1" class="ion-ios-circle-outline"></i>
                  <i ng-if="goods.ishot != 1" class="ion-ios-checkmark-outline checked"></i>
                  <span>否</span>
              </div>
          </label>
          <label class="item item-input">
              <span class="label">店长推荐</span>
              <div class="divIs" on-tap="changeTopOn()">
                  <i ng-if="goods.istop != 1" class="ion-ios-circle-outline"></i>
                  <i ng-if="goods.istop == 1" class="ion-ios-checkmark-outline checked"></i>
                  <span>是</span>
              </div>
              <div class="divNo" on-tap="changeTopOff()">
                  <i ng-if="goods.istop == 1" class="ion-ios-circle-outline"></i>
                  <i ng-if="goods.istop != 1" class="ion-ios-checkmark-outline checked"></i>
                  <span>否</span>
              </div>
          </label>
          <div class="area-div">
              <span class="text">发货地点</span>
              <div class="province-div">
                  <select ng-model="goods.province" ng-options="province.provinceid as province.provincename for province in provinceData" ng-change="getProvince()">
                      <option value="">请选择省</option>
                  </select>
              </div>
              <div class="city-div">
                  <select ng-model="goods.city" ng-options="city.cityid as city.cityname for city in currentCity" ng-change="getCity()">
                      <option value="">请选择市</option>
                  </select>
              </div>
          </div>
          <div class="area-div">
              <span class="text">商品分类</span>
              <div class="province-div">
                  <select ng-model="goods.firstsort" ng-options="firstSort.firstsortid as firstSort.firstsortname for firstSort in Allsort" ng-change="getFirst()">
                      <option value="">请选择</option>
                  </select>
              </div>
              <div class="city-div">
                  <select ng-model="goods.secondsort" ng-options="secondsort.secondsortid as secondsort.secondsortname for secondsort in secondSort" ng-change="getSecond()">
                      <option value="">请选择</option>
                  </select>
              </div>
              <div class="city-div">
                  <select ng-model="goods.thirdsort" ng-options="thirdsort.thirdsortid as thirdsort.thirdsortname for thirdsort in thirdSort" ng-change="getThird()">
                      <option value="">请选择</option>
                  </select>
              </div>
          </div>


      <label class="item item-input" style="border-bottom: none;">
        <span class="label">图片描述:</span>
      </label>
      <img-picker items="goods.txtimg" isupk="goods"></img-picker>
    </div>
    <div class="bottom-blank"></div>
  </ion-content>

</ion-view>
